Change how zoom on a clamped map works. #605
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before, if you have a clamped map or image and zoom in via the mouse wheel near an edge with adjacent empty space, the location of the map slides back and forth, rather than the point where you are zooming remaining under the mouse cursor.
Now, the coordinates under the mouse cursor remain the same, which means the map may not be clamped as fully as it could. You can drag the map to reduce the empty space that clamp would have removed in the past, but not to increase it. If you zoom in on an area off of the map, the clamping will still apply to prevent more than half of the viewport from having empty space. This also affects how rotation clamping works.
There was an oddness where the reported map center was not the visible map center if clamping had occurred. This has been fixed.
Also, noticed some needless code in the vgl renderer, so removed it.